package day03;

//八大基本类型
//整数 ：int long short byte
public class Demo05 {
    public static void main(String[] args) {
        //双精度的浮点类型
        double a;
        a = 3.1415926;


        //单精度浮点类型
        float b = 3.14F;
        System.out.println(a);
        System.out.println(b);

        //10是整数int类型的直接量，自动隐式转换
        double c = 10;
        System.out.println(c);//10.0
        //类型的转换
        //小类型转大类型的时候 就会发生自动隐式转换

        //byte->short-int-long->float->double

        byte t = 10;
        short o = t;//发生了自动隐式转换
        System.out.println(o);//10

        int s = o;
        System.out.println(s);
        s = t;
        System.out.println(s);
        byte v = 1;

        double y = v;
        System.out.println(y);

        //大类型转小类型时，属于强制类型转换;
        int x = 100000000;
        short z =(short) x;
        System.out.println(z);//强制类型转换的时候还要溢出

        short u = 25;
        byte m = (byte) u;
        System.out.println(u);





    }
}
